﻿Imports System.Data.SqlClient
Module Cmd
    'start function connect to database concept
    Function openconnection() As SqlConnection
        Dim cn As SqlConnection
        cn = New SqlConnection
        cn.ConnectionString = "server=.;uid=sa;pwd=123;database=BBUUniversity_db"
        cn.Open()
        Return cn
    End Function
    'end founction connection
    'start extutecommand with sql
    Public Sub ExcuteNonQuery(ByVal sql As String)
        Dim cmd As SqlCommand
        cmd = New SqlCommand
        cmd.Connection = openconnection()
        cmd.CommandText = sql
        cmd.ExecuteNonQuery()
    End Sub
    'end excute of command


End Module
